package com.hong.concurrent.chapter6;

/**
 * @Author csh
 * @Description 读写设计模式
 * @Date 2018/7/1 16:32
 */
public class ReadWritLockClient {

    public static void main(String[] args) {
        final ShareData shareData = new ShareData(10);
        new ReaderWorker(shareData).start();
        new ReaderWorker(shareData).start();
        new ReaderWorker(shareData).start();
        new ReaderWorker(shareData).start();
        new ReaderWorker(shareData).start();
        new ReaderWorker(shareData).start();
        new WriterWorker(shareData,"qwertyuiopasdfg").start();
        new WriterWorker(shareData,"QWERTYUIOPASDFG").start();
    }
}
